<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>{$page_title}</title>
       <script type="text/javascript" language="javascript" src="{lib file=jquery-1.6.3.min.js}"></script>
       <script language="javascript" type="text/javascript" src="{lib file=jquery.ui/jquery.ui.js}"></script>

        <script language="javascript" type="text/javascript" src="{res file=js/fabric_info.js}"></script>
        <script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=js/common.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=DatePicker/WdatePicker.js}"></script>
        <script language="javascript" type="text/javascript" src="{lib file=ajaxfileupload.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=js/jquery.funkyUI.js}"></script>
        <script language="JavaScript" type="text/javascript" src="{res file=js/lan.js}"></script>
        <link href="template/style/css/style.css" type="text/css" rel="stylesheet" />
        <script language="javascript" type="text/javascript" src="{res file=js/select.js}"></script>

        <style type="text/css">
.btn-2{margin-bottom:5px;}
.table_no_border,.table_no_border td,.table_no_border th{
	padding:0;
	margin:0;
	border-bottom:none;
	border-top:none;
	}
.fabric_info_table td,.fabric_info_table th{border-width:1px 1px 0 0;
	}
.fabric_info_table th{
   border-top:none;
}
.no_left_border
{
	border-left:none;
}
.fabric_info_table .no_right_border
{
	border-right:none;
}
.fabric_info_table .btn-2,.tab-add .btn-2{
	line-height:20px;
	height:20px;
	margin-bottom:1px;}

.cq_input-8{
	width:35px;
	}

.align_right{text-align:right;}
.td_align_1{text-align:left;}
.fabric_info_table input{width:90%;}
.center_txt td,.center_txt input{
	text-align:center;
	}
</style>
    </head>
<body>
<script type="text/javascript">
$(function() {
	
	$('select[select_input="select_input"]').each(function(i) {
		init_select_input($(this));
	});
	$('div.select-input').each(function(i) {
		$(this).css('z-index', $('div.select-input').length - i);
	});
	
	$('input.btn-2[value="移除"]').click(function() {
		remove_fabric_shop($(this));
	});
	
	$('input[acttype="confirm"]').click(function() {
		if (confirm('是否已经保存信息？更新样板信息之后将会使已确认样板状态无效。\r\n\r\n是否继续？')) {
			$.getJSON('index.php?app=sample&act=confirm&id={$smarty.get.id}', function(json) {
				alert(json.msg);
			});
		}
	});
	
	$("[name='cq_type'],[name='size_type']").change(function(){
		var ss_cq_type='{$ss_cq_type_json}';
		ss_cq_type=eval('('+ss_cq_type+')');
		if(ss_cq_type!="")
		{
			var type=$(this).val();
			var fields_name=ss_cq_type[type];
			var tr=$(this).parent().parent();
			tr.find("[cqindex='2']").html(fields_name[2]);
			tr.find("[cqindex='3']").html(fields_name[3]);
			tr.find("[cqindex='4']").html(fields_name[4]);
			tr.find("[cqindex='5']").html(fields_name[5]);
			tr.find("[cqindex='6']").html(fields_name[6]);
		}
	});
	
	
	//如果存在主唛id就显示主唛图片
	var m_id=$('#main_label').val();
	if(m_id!=0){
		$.ajax({
			url: 'index.php?app=ss&act=ajax_mian_label_img&m_id=' + m_id,
			type: 'GET',
			dataType:'json',
			error: function () {alert('网络连接错误，请稍后再试');},
			success: function (data) {
				if (data != '') {
					var str='';
					str += '<span><a href="download.php?id='+data.file_id+'" ><img src="'+data.file_path+'" title="'+data.file_name+'"></img></a></span>';
					$('#main_file').html(str);
				}
			}
		});
	}else{
		$('#main_file').html('');
	}
	
	//如果存在挂牌id就显示挂牌图片
	var l_id=$('#listing_code').val();
	if(l_id!=0){
		$.ajax({
			url: 'index.php?app=ss&act=ajax_listing_img&l_id=' + l_id,
			type: 'GET',
			dataType:'json',
			error: function () {alert('网络连接错误，请稍后再试');},
			success: function (data) {
				if (data != '') {
					var str='';
					str += '<span><a href="download.php?id='+data.file_id+'" ><img src="'+data.file_path+'" title="'+data.file_name+'"></img></a></span>';
					$('#listing_file').html(str);
				}
			}
		});
	}else{
		$('#listing_file').html('');
	}
	
	
	//如果存在钉珠挂牌id就显示挂牌图片
	var bl_id=$('#bead_listing_code').val();
	if(bl_id!=0){
		$.ajax({
			url: 'index.php?app=ss&act=ajax_listing_img&l_id=' + bl_id,
			type: 'GET',
			dataType:'json',
			error: function () {alert('网络连接错误，请稍后再试');},
			success: function (data) {
				if (data != '') {
					var str='';
					str += '<span><a href="download.php?id='+data.file_id+'" ><img src="'+data.file_path+'" title="'+data.file_name+'"></img></a></span>';
					$('#bead_listing_file').html(str);
				}
			}
		});
	}else{
		$('#bead_listing_file').html('');
	}
	
	//如果有挂绳，就选择挂绳
	var sl_id="{$ss_info.sling_id}";
	if(sl_id!=0){
		$('#is_sling').attr('checked',true);
		$('#sling_info').show();
	}
	
	//如果有备用扣，就选择备用扣
	var sp_id="{$ss_info.spare_id}";
	if(sp_id!=0){
		$('#is_spare').attr('checked',true);
		$('#spare_id').show();
	}

});

function sort_new_fabric_info()
{
	$('input[name^="new_fabric_info"][name$="[description]"]').each(function(i) {
		$(this).attr('name', 'new_fabric_info[' + i + '][description]');
	});
	$('input[name^="new_fabric_info"][name$="[fabric_shop_id]"]').each(function(i) {
		$(this).attr('name', 'new_fabric_info[' + i + '][fabric_shop_id]');
		$(this).attr('id', 'new_fabric_info[' + i + '][fabric_shop_id]');
	});
}

function remove_fabric_shop(_this)
{
	if (!confirm('确定要移除该信息吗？')) {
		return;
	}
	$(_this).parent().parent().remove();
}

function change_pic(id){
	$.funkyUI({url:"index.php?app=comupload&act=order_pics&id="+id,css:{width:"350",height:"250"}});
	return false;
}

function calculate(_this){
	var total = 0;
	$(_this).parent().parent().children().children().each(function(i,n){
		var obj = $(n);
		if(i>3&&i<10){
		 total = total*1+obj.val()*1;
		}else if(i==10){
			obj.val(total);
		}
	});
}

function change_size(_this){
	var code = new Number($(_this).parent().parent().children(":nth-child(8)").children(":only-child").val());
	var a = $(_this).parent().parent().children().children();
	var b;
	var c;
	a.each(function(i,n){
		if(i>0&&i<7){
			var obj = $(n);
			if(obj.attr("name")==$(_this).attr("name")){
				b = new Number(i);
				c = new Number($(_this).val());
			}
		}
		if($(_this).attr("name")=="code[]"){
			b = new Number(1);
			c = new Number($(_this).parent().parent().children(":nth-child(2)").children(":only-child").val());
		}
	});
	a.each(function(i,n){
		var obj = $(n);
		if(i>0&&i<7){
			obj.val(Math.round((c+(i-b)*code)*100)/100);
		}
	});
}

  function remove_style_size(_this)
  {
	  if (!confirm('确定要移除该信息吗')) {
		  return;
	  }
	  $(_this).parent().parent().remove();
  }
  function add_style_size()
  {

	  var newTr = $('#one_size').clone(true);
	  newTr.css("display","");
	  $('#one_size').parent().parent().find("tr:last").after(newTr);
  }
</script>
        <script type="text/javascript">
function approve_no()
{
	
	if($("#approve_no_desc").val()=="")
	{
		$.funkyUI({url:"index.php?app=ss&act=approve_not_pass",css:{width:"455",height:"330"}});
		return false;
	}
	return true;
}
		</script>
<div class="sub-body">
	<h3 class="title-1 tab-frame">制单信息</h3>
    <div class="tab-frame" style="width:900px;">
		<form method="post">
		<table cellpadding="0" cellspacing="0">
        	<tr>
            	<th width="120" class="align_right">下单日期：</th>
            	<td width="180" class="td_align_1" colspan="3">{$order.order_create_date|date}</td>
            	<th colspan="2" width="300">正面</th>
            	<th colspan="2" width="300">反面</th>
            </tr>
            <tr>
            	<th class="align_right">制单状态：</th>
            	<td class="td_align_1" colspan="3">{$lang.ss_status.$ss_info.ss_status}</td>
            	<td colspan="2" rowspan="10" style="text-align:center;"><img id="front_image" width="220" height="264" src="{$order.front_pic}" alt=""></td>
            	<td colspan="2" rowspan="10" style="text-align:center;"><img id="back_image" width="220" height="264" src="{$order.back_pic}" alt=""></td>
            </tr>
            <tr>
            	<th class="align_right">制单类型：</th>
            	<td class="td_align_1" colspan="3">
            		{$lang.ss_order_type.$ss_info.ss_order_type}
            	</td>
            </tr>
        	<tr>
            	<th class="align_right">品&nbsp;&nbsp;&nbsp;&nbsp;牌：</th>
            	<td class="td_align_1" colspan="3">{$order.brand_name}&nbsp;&nbsp;({$order.company_name|escape})</td>
            </tr>
        	<tr>
            	<th class="align_right">跟&nbsp;&nbsp;&nbsp;&nbsp;单：</th>
            	<td class="td_align_1" colspan="3">{$order.merchandiser}</td>
            </tr>
        	<tr>
            	<th class="align_right">订&nbsp;单&nbsp;号：</th>
            	<td class="td_align_1" colspan="3"><a style="color:blue" href="{url app=order&act=edit&id=$order.order_id}">{$order.order_sn|escape}</a> </td>
            </tr>
        	<tr>
            	<th class="align_right">款&nbsp;&nbsp;&nbsp;&nbsp;号：</th>
            	<td class="td_align_1" colspan="3">{$order.style_sn|escape}</td>
            </tr>
        	<tr>
            	<th class="align_right">款&nbsp;&nbsp;&nbsp;&nbsp;式：</th>
            	<td class="td_align_1" colspan="3">{$order.style_name}</td>
            </tr>
        	<tr>
            	<th class="align_right">工&nbsp;&nbsp;&nbsp;&nbsp;厂：</th>
            	<td class="td_align_1" colspan="3">{$order.factory_name}</td>
            </tr>
        	<tr>
            	<th class="align_right">运&nbsp;&nbsp;&nbsp;&nbsp;输：</th>
            	<td class="td_align_1" colspan="3">{if $order.trans_type == 1}空运{else}海运{/if}</td>
            </tr>
            <tr>
            	<th class="align_right">目的地：</th>
            	<td class="td_align_1" colspan="3">{$order.brand_addr}</td>
            </tr>
        	<tr>
            	<th class="align_right">件&nbsp;&nbsp;&nbsp;&nbsp;数：</th>
            	<td class="td_align_1" colspan="3">{$order.quantity}</td>
            	<td colspan="4" style="text-align:center;"><!--{if !$order.confirm_date && $order.status != 5}--><input id="front_pic" type="hidden" name="info[front_pic]" value="{$order.front_pic}"><input id="back_pic" type="hidden" name="info[back_pic]" value="{$order.back_pic}"><input type="button" onclick="change_pic('{$order.order_id}');" class="btn-3" value="更新图片"><!--{/if}--></td>
            </tr>
        	<tr>
            	<th class="align_right">工厂入仓日期：</th>
            	<td class="td_align_1" colspan="3">{$order.release_date|date}</td>
            	<th class="align_right">SEASON：</th>
            	<td  colspan="3" class="td_align_1" >{$ss_info.SEASON}</td>
            </tr>
        
            <tr>
            	<th class="align_right">PGR：</th>
            	<td colspan="3" class="td_align_1" >{$ss_info.PGR}</td>
                <th class="align_right">SGR：</th>
            	<td class="td_align_1">{$ss_info.SGR}</td>
                <th class="align_right">ITEM GROUP：</th>
            	<td class="td_align_1">{$ss_info.ITEM_GROUP}</td>
            </tr>
            
            <tr>
            	<th align="right" style="width: 83px">主唛：</th>
				<td style="width: 217px" colspan="3">
					<select style="width: 70%" name="main_label" id="main_label" disabled="disabled">
						<option value="0">{$lang.select_pls}</option>
						<!--{foreach from=$main_list item=mains}-->
						<option value="{$mains.m_id}" {if $mains.m_id==$ss_info.ss_m_id}selected{/if}>{$mains.main_code}</option>
						<!--{/foreach}-->
			  		</select>
				</td>
                <th align="right">挂牌：</th>
				<td>
					<select style="width: 70%" name="listing_code" id="listing_code" disabled="disabled">
						<option value="0">{$lang.select_pls}</option>
						<!--{foreach from=$listing item=lists}-->
						<option value="{$lists.list_id}" {if $lists.list_id==$ss_info.ss_list_id}selected{/if}>{$lists.listing_code}</option>
						<!--{/foreach}-->
			  		</select>
				</td>
				<th align="right">钉珠挂牌：</th>
				<td>
					<select style="width: 70%" name="bead_listing_code" id="bead_listing_code" disabled="disabled">
						<option value="0">{$lang.select_pls}</option>
						<!--{foreach from=$listing item=lists}-->
						<option value="{$lists.list_id}" {if $lists.list_id==$ss_info.bead_list_id}selected{/if}>{$lists.listing_code}</option>
						<!--{/foreach}-->
			  		</select>
				</td>
            </tr>
            <tr>
                <th align="right" style="width: 83px">图片：</th>
				<td align="left" style="width: 217px" colspan="3">
					<div id="main_file" style="width: 95%">
					</div>
				</td>
            	<th align="right">图片：</th>
				<td align="left">
					<div id="listing_file" style="width: 95%">
					</div>
				</td>
				<th align="right">图片：</th>
				<td align="left">
					<div id="bead_listing_file" style="width: 95%">
					</div>
				</td>
            </tr>
           <!-- {if $user.role==USER_TAIL_MANAGE} -->
           <tr>
				<th align="right">批改意见：</th>
				<td colspan="7">
                <div id="file_pigai">
                <!--{foreach from=$file_pigai item=file}-->
				<span><a href="download.php?id={$file.file_id}">{$file.file_name}</a>
				&nbsp;&nbsp;<!--{if !$smarty.foreach.last}--></span><!--{/if}--> <!--{/foreach}-->
                </div>
                </td>
			</tr>
			<!-- {/if} -->
			<tr>
            <th class="align_right" colspan="1">颜色/数量：</th>
				<td colspan="7" style="padding:0; margin:0;">
					<table cellpadding="0" cellspacing="0" class="fabric_info_table center_txt" width="100%">
		           <th width="8%">颜色</th>
                   <th width="8%">颜色描述</th>
                   <th width="8%">色号</th>
			       <th width="8%">包装配比</th>
			       <th width="8%" cqindex="1">
                   {$curr_cq_sizename.v1_name}</th>
			       <th width="8%" cqindex="2">{$curr_cq_sizename.v2_name}</th>
			       <th width="8%" cqindex="3">{$curr_cq_sizename.v3_name}</th>
			       <th width="8%" cqindex="4">{$curr_cq_sizename.v4_name}</th>
			       <th width="8%" cqindex="5">{$curr_cq_sizename.v5_name}</th>
			       <th width="8%" cqindex="6">{$curr_cq_sizename.v6_name}</th>
			       <th width="8%" class="no_right_border">合计</th>
                    
			      <!--{foreach from=$cq_info item=c name=n}-->
			       <tr>
			       <td>{$c.color}</td>
                    <td>{$c.color_desc}</td>
                     <td>{$c.color_num}</td>
			       <td>{$c.proportion}</td>
			       <td>{$c.v6}</td>
			       <td>{$c.v8}</td>
			       <td>{$c.v10}</td>
			       <td>{$c.v12}</td>
			       <td>{$c.v14}</td>
			       <td>{$c.v16}</td>
			       <td class="no_right_border">{$c.total}</td>
			       </tr>
			      <!--{/foreach}-->
		            </table>
	            </td>
            </tr>
			<tr>
		        <th class="align_right" colspan="1">面料信息：</th>
		       <td colspan="7"  style="padding:0; margin:0;">
		       <table width="100%" class="fabric_info_table center_txt" cellpadding="0" cellspacing="0">
		       <th width="15%" class="no_left_border">面料描述</th>
		       <th width="28%">{$lang.fabric_shop_name}</th>
		       <th width="10%">品名/货号</th>
		       <th width="8%" >价格</th>
		       <th width="8%" >幅宽</th>
		       <th width="5%" class="no_right_border">色卡</th>
		       
		      <!--{foreach from=$fabric_info_list item=fabric_info name=fi}-->
		       <tr class="fabric_info_list">
		       <td>
		       <input name="fabric_info_id[]" type="hidden" value="{$fabric_info.fabric_info_id}" />
		           <input name="cc_id[]" item="cc_id" type="hidden" value="{$fabric_info.cc_id}" />
		       <input name="description[]" item="description" type="hidden"  value="{$fabric_info.description|escape}" />{$fabric_info.description|escape}</td>
		       <td>
		       <input name="fabric_shop_name[]" item="fabric_shop_name" type="hidden"  value="{$fabric_info.fabric_shop_id}" />
		{$fabric_info.fabric_shop_name}</td>    
		       <td>
		       <input name="item[]" item="item" type="hidden"  value="{$fabric_info.item}" />
		{$fabric_info.item}
		</td>
		       <td>
		       <input name="price[]" item="price" type="hidden"  value="{$fabric_info.price}" />
		 {$fabric_info.price}</td>   
		       <td>
		        <input name="width[]" item="width" type="hidden"  value="{$fabric_info.width}" />
		{$fabric_info.width}</td>
		       <td  class="no_right_border">
		      <a  item="picture_show" cid="{$fabric_info.cc_id}"  href="javascript:;">查看</a>
		</td>
		       </tr>
		       <!--{/foreach}-->
		  
		       </table>
		       </td>
		      </tr>
			<th class="align_right" colspan="1">批办意见：</th>
				<td colspan="7" align="left">{$ss_info.opinion|nl2br}
				</td>
			</tr>
			
            <tr>
         <th class="align_right" colspan="1">配色要求：</th>   
            <td colspan="7" align="left">
            {$ss_info.color_requir|nl2br}
            </td>
            </tr>
	
			<tr>
		        <th class="align_right" colspan="1">船头板：</th>
				<td colspan="7" align="left">
					{$ss_info.ss_bow}
				</td>
			  </tr>
			  <tr>
			  	<th class="align_right">挂衣绳：</th>
			  	<td colspan="7" align="left">
			  		<input name="is_sling" id="is_sling" type="checkbox" value="1" disabled="disabled" />&nbsp;&nbsp;&nbsp;
			  		<span id="sling_info" style="display: none;"><input name="sling_length" id="sling_length" value="{$ss_info.sling_length}" type="text" style="width: 50px;" readonly="readonly" />厘米&nbsp;&nbsp;
			  		<select name="sling_id" id="sling_id" disabled="disabled">
			  			<option value=" "></option>
			  			<!-- {foreach from=$sling_list item=sling} -->
			  				<option value="{$sling.sling_id}" {if $sling.sling_id==$ss_info.sling_id}selected=true{/if}>{$sling.sling_position|escape}</option>
			  			<!-- {/foreach} -->
			  		</select>
			  		</span>
			  	</td>
			  </tr>
			  <tr>
			  	<th class="align_right">备用扣：</th>
			  	<td colspan="7" align="left">
		  			<input name="is_spare" id="is_spare" type="checkbox" value="1" disabled="disabled" />&nbsp;&nbsp;&nbsp;
			  		<select name="spare_id" id="spare_id" style="display: none" disabled="disabled">
			  			<option value=" "></option>
			  			<!-- {foreach from=$spare_list item=spare} -->
			  				<option value="{$spare.spare_id}" {if $spare.spare_id==$ss_info.spare_id}selected=true{/if}>{$spare.spare_position|escape}</option>
			  			<!-- {/foreach} -->
			  		</select>
			  	</td>
			  </tr>
	
			<tr>
            	<th colspan="1" class="align_right">洗水唛：</th>
            	<td colspan="5">
					<select style="width: 80%" disabled="disabled">
						<option value="0">{$lang.select_pls}</option>
						<!--{foreach from=$water_list item=water}-->
						<option value="{$water.water_id}" {if $water.water_id==$ss_info.water_id}selected{/if}>{$water.water_position|escape}</option>
						<!--{/foreach}-->
			  		</select>
            	</td>
            	<th class="align_right">洗水唛附件：</th>
            	<td  colspan="3" class="td_align_1" >
            		<!-- {if $is_edit} -->
            		<input type="button" class="btn-3" value="{$lang.upload_enclosure}" onClick="upload_docs({$belongs_ss_water}, {$ss_info.ss_id|default:$default_key_id});" />
            		<!-- {/if} -->
            		<div id="ss_water_img" style="display: inline;">
            			<!-- {foreach from=$ss_waters item=file} -->
            			<span><a href="download.php?id={$file.file_id}" style="color:blue">{$file.file_name}</a>
				        	<!-- {if $is_edit} -->
				        	<a class="pic_del" style="color:blue"  href="{url app=comupload&act=delete&id=$file.file_id}" onClick="return confirm('{$lang.confirm_del_file}')" title="{$lang.delete}">&nbsp;</a>
				        	<!-- {/if} -->
				        &nbsp;&nbsp;<!--{if !$smarty.foreach.last}--></span><!--{/if}-->
            			<!-- {/foreach} -->
            		</div>
            	</td>
            </tr>
			<tr>
            <th class="align_right" colspan="1">包装要求：</th>
				<td colspan="7" align="left">
					<!-- {foreach from=$pack_list item=packs} -->
						{$packs.package_demand}
					<!-- {/foreach} -->
				</td>
			</tr>
			
            <th class="align_right" colspan="1" >尺寸表：</th>
				<td colspan="7" style="padding:0; margin:0;">
					<table cellpadding="0" cellspacing="0" class="fabric_info_table center_txt" id="tab-color1" width="100%">
                  
		           <th width="10%">部位尺寸</th>
			       <th width="5%" cqindex="1">
                   {$curr_size_sizename.v1_name}</th>
			       <th width="5%" cqindex="2">{$curr_size_sizename.v2_name}</th>
			       <th width="5%" cqindex="3">{$curr_size_sizename.v3_name}</th>
			       <th width="5%" cqindex="4">{$curr_size_sizename.v4_name}</th>
			       <th width="5%" cqindex="5">{$curr_size_sizename.v5_name}</th>
			       <th width="5%" cqindex="6">{$curr_size_sizename.v6_name}</th>
			       <th width="10%" class="no_right_border">跳码 CM/码</th>
			       <!--{foreach from=$size_ss_info item=s name=n}-->
			       <tr>
			       <td>{$s.position}</td>
			       <td>{$s.w6}</td>
			       <td>{$s.w8}</td>
			       <td>{$s.w10}</td>
			       <td>{$s.w12}</td>
			       <td>{$s.w14}</td>
			       <td>{$s.w16}</td>
			       <td>{$s.code}</td>
			       </tr>
			       <!-- {/foreach} -->	
            <tr id="one_size" style="display:none;">
        <td><input type="text" name="position[]" value=""></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="w6[]" value="" class="input-5"></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="w8[]" value="" class="input-5"></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="w10[]" value="" class="input-5"></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="w12[]" value="" class="input-5"></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="w14[]" value="" class="input-5"></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="w16[]" value="" class="input-5"></td>
        <td><input onBlur="javascript:change_size(this);" type="text" name="code[]" value="" class="input-5"></td>
        <td><input type="button" item="op" class="btn-2" value="删除" onClick="remove_style_size(this);" /></td>
      </tr>

		            </table>
	            </td>
            </tr>
             {if !$is_print}
            <tr>
				<th colspan="8">
                {if $smarty.get.act eq 'approve'}
                <input class="btn-2" onClick="if(confirm('确定制单审批通过吗?')!=true){return false;}" type="submit" name="submit" value="审批通过">
                <input class="btn-2" id="ss_approve_notpass"  onClick="return approve_no()"  type="submit" name="submit" value="审批不通过">  <textarea style="width:100%; height:60px; display:none;" id="approve_no_desc"  name="approve_no_desc"></textarea>
                {/if}
                <input class="btn-2" type="button" onclick="location.href='{url app=ss&act=ssprint&ss_id=$ss_info.ss_id}'" value="打印制单">
                {if $user.role eq USER_MANAGER || $user.role eq USER_MERCHANDISER_ADMIN}
                 <input class="btn-2" type="button"  onClick="if(confirm('确定重置制单吗?')==true){location.href='{url app=ss&act=resetss&ss_id=$ss_info.ss_id}';}" value="重置">
                 {/if}
			</tr>
           {/if}
		</table>
		</form>
	</div>
</div>
{$async_sendmail}
<script language="JavaScript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
	   {if $is_print}
<script type="text/javascript">
$(function(){
	window.print();
	})
</script>
{/if}
</body>
</html>